Skip to content

HTML API: Handle adoption agency fallback end tags#44

Open
sirreal wants to merge 6 commits into
trunkfrom
html-api-fuzz-fiz/adoption-agency
Open

HTML API: Handle adoption agency fallback end tags#44
sirreal wants to merge 6 commits into
trunkfrom
html-api-fuzz-fiz/adoption-agency

Conversation

@sirreal

@sirreal sirreal commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extract the in-body "any other end tag" handling so the adoption agency algorithm can reuse it.
  • Route the no-active-formatting-element fallback through that helper instead of bailing as unsupported.
  • Add serialization and semantic-rule regressions for unexpected formatting end tags.

Testing

  • HTML API and html5lib PHPUnit groups pass.
  • PHPCS pass for the changed HTML API files.
  • codex review --base trunk.

Trac ticket: https://core.trac.wordpress.org/ticket/65372

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5.5
Used for: PR description cleanup and code review.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props jonsurrell, sergeybiryukov.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@sirreal

sirreal commented Jun 10, 2026

Copy link
Copy Markdown
Owner Author

Code review

Found 1 issue:

  1. The new step_in_body_any_other_end_tag() method is annotated @since 6.9.0, but trunk is at 7.1-alpha (src/wp-includes/version.php#L19) and Trac #65372 is milestoned 7.1. This should be @since 7.1.0.

*
* @since 6.9.0
* @ignore

Also verified (no action needed): the adoption agency fallback to "any other end tag" matches the spec ("If there is no such element, then return and instead act as described in the 'any other end tag' entry above"), and the start-tag call sites (+A, +NOBR) cannot reach the fallback — +A is guarded by the active formatting elements walk, and the +NOBR paths that could diverge bail earlier.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

sirreal added a commit that referenced this pull request Jun 10, 2026
# Conflicts:
#	src/wp-includes/html-api/class-wp-html-processor.php
SergeyBiryukov and others added 4 commits June 12, 2026 23:42
This updates the `@param` and `@return` descriptions to state that `build_query()` does **not** URL-encode, unlike PHP's native `http_build_query()`, and that callers are responsible for encoding the values beforehand or late-escaping the output with `esc_url()`.

Follow-up to [8215].

Props nimeshatxecurify,  johnbillion.
Fixes #65453.

git-svn-id: https://develop.svn.wordpress.org/trunk@62497 602fd350-edb4-49c9-b593-d223f7449a82
…zip.php`.

This replaces `Chr()` and `Ord()` with their canonical lowercase forms `chr()` and `ord()`.

This is flagged as a case-sensitivity violation by the upcoming [https://wiki.php.net/rfc/case_sensitive_php PHP 8.6 RFC], which will emit `E_DEPRECATED` for function references that don't match their declared casing. Fixing it now keeps WordPress ahead of the deprecation.

Props Soean.
See #64897.

git-svn-id: https://develop.svn.wordpress.org/trunk@62498 602fd350-edb4-49c9-b593-d223f7449a82
This removes an unused variable in `WP_Interactivity_API::data_wp_class_processor()`.

Follow-up to [57563], [61020].

Props Soean.
See #64897.

git-svn-id: https://develop.svn.wordpress.org/trunk@62499 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants